<template>
	<view class="search_view" @click="searchClick" :style="{'background-color' : bgColor}">
		<view class="search_round_view" :style="{'border-radius' : radius + 'px'}">
			<uni-icons type="search" size="20"></uni-icons>
			<text>搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		
		props: {
			bgColor: {
				type: String,
				default: '#C00000'
			},
			radius: {
				type: Number,
				default: 18
			}
		},
		
		methods: {
			searchClick() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
.search_view {
	//background-color: #ff452d;
	height: 45px;
	display: flex;
	align-items: center;
	
	.search_round_view {
		background-color: #FFFFFF;
		height: 35px;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 0 5px;
		//border-radius: 20px;
		
		text {
			font-size: 13px;
			margin-left: 2px;
		}
	}
}
</style>
